<?php
/** .-------------------------------------------------------------------
 * |  Software: [HDCMS framework]
 * |      Site: www.hdcms.com
 * |-------------------------------------------------------------------
 * |    Author: 向军 <2300071698@qq.com>
 * |    WeChat: aihoudun
 * | Copyright (c) 2012-2019, www.houdunwang.com. All Rights Reserved.
 * '-------------------------------------------------------------------*/

namespace web\home\controller;


class Order{
    //动作
	public function index(){
	    if (!$_SESSION['home']['uid']){
	        go('login.index');
        }
	    $data = Cart::getGoods();
        foreach ($data as $k=>$v){
            $data = $v;
            $data['pic'] = Db::table('goods')->where('gid',$data['id'])->pluck('pic');
        }
//        p($data);
        View::with('data',$data);
		View::make();
	}
    public function code(){
        Code::num(1)->make();
    }
}
